<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::net_flow::Net_env_simulator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1net__flow.html">net_flow</a></li><li class="navelem"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html">Net_env_simulator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-types">Private Types</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classflow_1_1net__flow_1_1Net__env__simulator-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::net_flow::Net_env_simulator Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Objects of this class can be fed to <a class="el" href="classflow_1_1net__flow_1_1Node.html" title="An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...">Node</a> to make it internally simulate network conditions like loss, latency, and data duplication.  
 <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for flow::net_flow::Net_env_simulator:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Net__env__simulator__inherit__graph.svg" width="310" height="119"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for flow::net_flow::Net_env_simulator:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Net__env__simulator__coll__graph.svg" width="1530" height="496"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:abfee43798dfbb7edb5428d1b939e5d53"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#abfee43798dfbb7edb5428d1b939e5d53">seed_type_t</a> = uint32_t</td></tr>
<tr class="memdesc:abfee43798dfbb7edb5428d1b939e5d53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for the random seed integer type.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#abfee43798dfbb7edb5428d1b939e5d53">More...</a><br /></td></tr>
<tr class="separator:abfee43798dfbb7edb5428d1b939e5d53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b0ed8c75b296b26b63eacb73e4b3d5d"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a> = double</td></tr>
<tr class="memdesc:a6b0ed8c75b296b26b63eacb73e4b3d5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for floating point between 0 and 1 used to express probability.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">More...</a><br /></td></tr>
<tr class="separator:a6b0ed8c75b296b26b63eacb73e4b3d5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af810d3db1d281e1a29e9b0ebf578a2ca"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">Packet_loss_seq</a> = std::queue&lt; <a class="el" href="classbool.html">bool</a> &gt;</td></tr>
<tr class="memdesc:af810d3db1d281e1a29e9b0ebf578a2ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for list of packet loss outcomes.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">More...</a><br /></td></tr>
<tr class="separator:af810d3db1d281e1a29e9b0ebf578a2ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ed1661440b977426b6d5be959ecc85a"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">Packet_dup_seq</a> = std::queue&lt; <a class="el" href="classbool.html">bool</a> &gt;</td></tr>
<tr class="memdesc:a3ed1661440b977426b6d5be959ecc85a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for list of packet duplication outcomes.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">More...</a><br /></td></tr>
<tr class="separator:a3ed1661440b977426b6d5be959ecc85a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1db158ebdacaeea526a9d50c5beddc0d"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">Latency_seq</a> = std::queue&lt; <a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a> &gt;</td></tr>
<tr class="memdesc:a1db158ebdacaeea526a9d50c5beddc0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for list of packet latencies.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">More...</a><br /></td></tr>
<tr class="separator:a1db158ebdacaeea526a9d50c5beddc0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dc71851284e2d20ab6760b82defa6b8"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a9dc71851284e2d20ab6760b82defa6b8">Latency_range</a> = std::pair&lt; <a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a>, <a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a> &gt;</td></tr>
<tr class="memdesc:a9dc71851284e2d20ab6760b82defa6b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for latency range [low, high].  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a9dc71851284e2d20ab6760b82defa6b8">More...</a><br /></td></tr>
<tr class="separator:a9dc71851284e2d20ab6760b82defa6b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a29cbd6ad9be0d9bf7ac72a4e0675d4b8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a29cbd6ad9be0d9bf7ac72a4e0675d4b8">Net_env_simulator</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *logger_ptr, <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#abfee43798dfbb7edb5428d1b939e5d53">seed_type_t</a> random_seed=0, <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a> recv_packet_loss_prob=0, const <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">Packet_loss_seq</a> &amp;recv_packet_loss_seq=<a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">Packet_loss_seq</a>(), const <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a9dc71851284e2d20ab6760b82defa6b8">Latency_range</a> &amp;recv_latency_range=<a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a9dc71851284e2d20ab6760b82defa6b8">Latency_range</a>(), const <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">Latency_seq</a> &amp;recv_latency_seq=<a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">Latency_seq</a>(), <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a> recv_packet_dup_prob=0, const <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">Packet_dup_seq</a> &amp;recv_packet_dup_seq=<a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">Packet_dup_seq</a>())</td></tr>
<tr class="memdesc:a29cbd6ad9be0d9bf7ac72a4e0675d4b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs simulator.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a29cbd6ad9be0d9bf7ac72a4e0675d4b8">More...</a><br /></td></tr>
<tr class="separator:a29cbd6ad9be0d9bf7ac72a4e0675d4b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4f21b9f4db47570989e87af50b560ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#ad4f21b9f4db47570989e87af50b560ae">should_drop_received_packet</a> ()</td></tr>
<tr class="memdesc:ad4f21b9f4db47570989e87af50b560ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Low-level packet was received, but should we simulate that it was dropped before receipt? Probability and/or prescribed packet loss are set at construction.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#ad4f21b9f4db47570989e87af50b560ae">More...</a><br /></td></tr>
<tr class="separator:ad4f21b9f4db47570989e87af50b560ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadc0bd07b7d8f589ec6f361ed4ed8c6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#aadc0bd07b7d8f589ec6f361ed4ed8c6c">received_packet_latency</a> ()</td></tr>
<tr class="memdesc:aadc0bd07b7d8f589ec6f361ed4ed8c6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Low-level packet was received and not dropped, but should we simulate that it was lagged by an additional amount of time, before actually getting received, and if so how much? Latency range and/or prescribed latencies are set at construction.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#aadc0bd07b7d8f589ec6f361ed4ed8c6c">More...</a><br /></td></tr>
<tr class="separator:aadc0bd07b7d8f589ec6f361ed4ed8c6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3507a56fd416c215423d4519e4ac176"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#ad3507a56fd416c215423d4519e4ac176">should_duplicate_received_packet</a> ()</td></tr>
<tr class="memdesc:ad3507a56fd416c215423d4519e4ac176"><td class="mdescLeft">&#160;</td><td class="mdescRight">Low-level packet was received, but should we simulate that it was duplicated? Probability and/or prescribed packet duplication decisions are set at construction.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#ad3507a56fd416c215423d4519e4ac176">More...</a><br /></td></tr>
<tr class="separator:ad3507a56fd416c215423d4519e4ac176"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classflow_1_1log_1_1Log__context"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflow_1_1log_1_1Log__context')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classflow_1_1log_1_1Log__context.html">flow::log::Log_context</a></td></tr>
<tr class="memitem:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *logger=0)</td></tr>
<tr class="memdesc:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="classflow_1_1log_1_1Log__context.html" title="Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...">Log_context</a> by storing the given pointer to a <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> and a null <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a>.  <a href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">More...</a><br /></td></tr>
<tr class="separator:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memTemplParams" colspan="2">template&lt;typename Component_payload &gt; </td></tr>
<tr class="memitem:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#af1ac7f30ab442c3c6aa6079335df6c9a">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *logger, Component_payload component_payload)</td></tr>
<tr class="memdesc:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="classflow_1_1log_1_1Log__context.html" title="Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...">Log_context</a> by storing the given pointer to a <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> and a new <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> storing the specified generically typed payload (an <code>enum</code> value).  <a href="classflow_1_1log_1_1Log__context.html#af1ac7f30ab442c3c6aa6079335df6c9a">More...</a><br /></td></tr>
<tr class="separator:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a5c57a7f44959a01ca9a1c948a6686cc0">Log_context</a> (const <a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;src)</td></tr>
<tr class="memdesc:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor that stores equal <code>Logger*</code> and <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> values as the source.  <a href="classflow_1_1log_1_1Log__context.html#a5c57a7f44959a01ca9a1c948a6686cc0">More...</a><br /></td></tr>
<tr class="separator:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move constructor that makes this equal to <code>src</code>, while the latter becomes as-if default-constructed.  <a href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">More...</a><br /></td></tr>
<tr class="separator:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">operator=</a> (const <a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;src)</td></tr>
<tr class="memdesc:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator that behaves similarly to the copy constructor.  <a href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">More...</a><br /></td></tr>
<tr class="separator:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">operator=</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move assignment operator that behaves similarly to the move constructor.  <a href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">More...</a><br /></td></tr>
<tr class="separator:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">swap</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;other)</td></tr>
<tr class="memdesc:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> pointers and <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> objects held by <code>*this</code> and <code>other</code>.  <a href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">More...</a><br /></td></tr>
<tr class="separator:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">get_logger</a> () const</td></tr>
<tr class="memdesc:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the stored <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> pointer, particularly as many <code>FLOW_LOG_*()</code> macros expect.  <a href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">More...</a><br /></td></tr>
<tr class="separator:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classflow_1_1log_1_1Component.html">Component</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">get_log_component</a> () const</td></tr>
<tr class="memdesc:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns reference to the stored <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> object, particularly as many <code>FLOW_LOG_*()</code> macros expect.  <a href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">More...</a><br /></td></tr>
<tr class="separator:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-types" name="pri-types"></a>
Private Types</h2></td></tr>
<tr class="memitem:aae1f08e4dec6c3e4855a3548b1e88ffb"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#aae1f08e4dec6c3e4855a3548b1e88ffb">Random_generator</a> = <a class="el" href="classflow_1_1util_1_1Rnd__gen__uniform__range__base.html#a519fc83fd1c52a82618cd85f3a089668">util::Rnd_gen_uniform_range_base::Random_generator</a></td></tr>
<tr class="memdesc:aae1f08e4dec6c3e4855a3548b1e88ffb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Random number generator.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#aae1f08e4dec6c3e4855a3548b1e88ffb">More...</a><br /></td></tr>
<tr class="separator:aae1f08e4dec6c3e4855a3548b1e88ffb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ac532250636f3ae5b045310e9d791c7d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#abfee43798dfbb7edb5428d1b939e5d53">seed_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#ac532250636f3ae5b045310e9d791c7d2">m_seed</a></td></tr>
<tr class="memdesc:ac532250636f3ae5b045310e9d791c7d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Random seed for <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a564e92e0cb49425be5962db80ef75a43" title="Random number generator for various random events like packet loss.">m_rnd_generator</a> (saved for reproducibility of "random" events).  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#ac532250636f3ae5b045310e9d791c7d2">More...</a><br /></td></tr>
<tr class="separator:ac532250636f3ae5b045310e9d791c7d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a564e92e0cb49425be5962db80ef75a43"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#aae1f08e4dec6c3e4855a3548b1e88ffb">Random_generator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a564e92e0cb49425be5962db80ef75a43">m_rnd_generator</a></td></tr>
<tr class="memdesc:a564e92e0cb49425be5962db80ef75a43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Random number generator for various random events like packet loss.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a564e92e0cb49425be5962db80ef75a43">More...</a><br /></td></tr>
<tr class="separator:a564e92e0cb49425be5962db80ef75a43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a861af16185e100777bff382b278ac138"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">Packet_loss_seq</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a861af16185e100777bff382b278ac138">m_recv_packet_loss_seq</a></td></tr>
<tr class="memdesc:a861af16185e100777bff382b278ac138"><td class="mdescLeft">&#160;</td><td class="mdescRight">At a given point in time, the <code>i</code>-th from now (in chronological order) received packet will be dropped if and only if the <code>i</code>-th element of <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a861af16185e100777bff382b278ac138" title="At a given point in time, the i-th from now (in chronological order) received packet will be dropped ...">m_recv_packet_loss_seq</a> is true.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a861af16185e100777bff382b278ac138">More...</a><br /></td></tr>
<tr class="separator:a861af16185e100777bff382b278ac138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a599755f43627661e5ab721f57708ecac"><td class="memItemLeft" align="right" valign="top">boost::random::bernoulli_distribution&lt; <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a599755f43627661e5ab721f57708ecac">m_recv_packet_loss_distribution</a></td></tr>
<tr class="memdesc:a599755f43627661e5ab721f57708ecac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> or <code>false</code> according to some probability set at construction; used for received packet loss.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a599755f43627661e5ab721f57708ecac">More...</a><br /></td></tr>
<tr class="separator:a599755f43627661e5ab721f57708ecac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac14a4e2f96cde90306384313730ee914"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">Latency_seq</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#ac14a4e2f96cde90306384313730ee914">m_recv_latency_seq</a></td></tr>
<tr class="memdesc:ac14a4e2f96cde90306384313730ee914"><td class="mdescLeft">&#160;</td><td class="mdescRight">At a given point in time, the <code>i</code>-th from now (in chronological order) received packet will be lagged by value in <code>i</code>-th element of <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#ac14a4e2f96cde90306384313730ee914" title="At a given point in time, the i-th from now (in chronological order) received packet will be lagged b...">m_recv_latency_seq</a>.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#ac14a4e2f96cde90306384313730ee914">More...</a><br /></td></tr>
<tr class="separator:ac14a4e2f96cde90306384313730ee914"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa077d5b9bc824da5fa7f3b504c83d33c"><td class="memItemLeft" align="right" valign="top">boost::random::uniform_int_distribution&lt; Fine_duration::rep &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#aa077d5b9bc824da5fa7f3b504c83d33c">m_recv_latency_distribution_msec</a></td></tr>
<tr class="memdesc:aa077d5b9bc824da5fa7f3b504c83d33c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns random latencies (in units of <code>Fine_duration</code>) within the improper [low, high] range given at construction; used for received packet latency.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#aa077d5b9bc824da5fa7f3b504c83d33c">More...</a><br /></td></tr>
<tr class="separator:aa077d5b9bc824da5fa7f3b504c83d33c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b05bfbdaee55c7ece72344e4a0f3b04"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">Packet_dup_seq</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a2b05bfbdaee55c7ece72344e4a0f3b04">m_recv_packet_dup_seq</a></td></tr>
<tr class="memdesc:a2b05bfbdaee55c7ece72344e4a0f3b04"><td class="mdescLeft">&#160;</td><td class="mdescRight">At a given point in time, the <code>i</code>-th from now (in chronological order) received packet will be duplicated if and only if the <code>i</code>-th element of <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a2b05bfbdaee55c7ece72344e4a0f3b04" title="At a given point in time, the i-th from now (in chronological order) received packet will be duplicat...">m_recv_packet_dup_seq</a> is <code>true</code>.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#a2b05bfbdaee55c7ece72344e4a0f3b04">More...</a><br /></td></tr>
<tr class="separator:a2b05bfbdaee55c7ece72344e4a0f3b04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab01aa06b2136ab24ef7d411698096fc4"><td class="memItemLeft" align="right" valign="top">boost::random::bernoulli_distribution&lt; <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#ab01aa06b2136ab24ef7d411698096fc4">m_recv_packet_dup_distribution</a></td></tr>
<tr class="memdesc:ab01aa06b2136ab24ef7d411698096fc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> or <code>false</code> according to some probability set at construction; used for received packet duplication.  <a href="classflow_1_1net__flow_1_1Net__env__simulator.html#ab01aa06b2136ab24ef7d411698096fc4">More...</a><br /></td></tr>
<tr class="separator:ab01aa06b2136ab24ef7d411698096fc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Objects of this class can be fed to <a class="el" href="classflow_1_1net__flow_1_1Node.html" title="An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...">Node</a> to make it internally simulate network conditions like loss, latency, and data duplication. </p>
<p >At construction one provides parameters controlling those phenomena; then when <a class="el" href="classflow_1_1net__flow_1_1Node.html" title="An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...">Node</a> is about to receive or send some actual network traffic it asks this object whether it should first simulate some phenomenon like a lost packet. For example, if a loss probability is given at construction, bool <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#ad4f21b9f4db47570989e87af50b560ae" title="Low-level packet was received, but should we simulate that it was dropped before receipt?...">should_drop_received_packet()</a> will return whether the current received packet should be "dropped" instead of handled, which <a class="el" href="classflow_1_1net__flow_1_1Node.html" title="An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...">Node</a> will simulate internally by ignoring or handling the packet.</p>
<p >This is not really meant as a replacement for real tools that simulate such phenomena (or obviously the actual phenomena in a real network). The way it simulates them is probably unrealistic; for example a wide latency range given in the constructor will cause packets to be re-ordered quite a bit, whereas on a real network the packets are more likely to arrive in the right order but with widely varying latencies over time. Anyway &ndash; the idea of using this is not to benchmark <a class="el" href="classflow_1_1net__flow_1_1Node.html" title="An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...">Node</a>'s performance under various network conditions; it is to test its correctness. For example: do frequent packet duplications and drops cause <a class="el" href="classflow_1_1net__flow_1_1Node.html" title="An object of this class is a single Flow-protocol networking node, in the sense that: (1) it has a di...">Node</a> to enter an unexpected state and crash? What happens when an ESTABLISHED socket receives a late re-ordered SYN_ACK after already getting some DATA? Etc. etc.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000087">Todo:</a></b></dt><dd>One thing we should probably add for a bit of realism is the following. If a loss range [A, B] is specified, an individual packet's simulated latency will be a uniformly random number in that range. Because of this there will be frequent re-ordering of packets: if range is [50, 100] ms, and we physically get packet X at time 0 and packet Y at time 5 ms, and the simulated latencies are 80, 60 ms, respectively, then Y will "arrive" 80 - 60 - 5 = 15 ms BEFORE X despite being sent earlier (assuming perfect actual network conditions under the simulation). In reality, packets aren't re-ordered all that often. So if we wanted to simulate a high latency without re-ordering, we'd have to set the range to [A, A] for some A. To avoid having to do that, we can add some internal memory into <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html" title="Objects of this class can be fed to Node to make it internally simulate network conditions like loss,...">Net_env_simulator</a> that would put a floor on a randomly generated latency. In the previous example, the range for packet Y would be chosen as [75, 100] (instead of [50, 100]) to guarantee that packet Y arrives at least a bit later than packet X. Of course that might skew the latency range in bursty traffic, but that might be an OK behavior. We could add a knob for how often to ignore this new logic and allow a re-ordering, so that that is also simulated. </dd></dl>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00067">67</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a9dc71851284e2d20ab6760b82defa6b8" name="a9dc71851284e2d20ab6760b82defa6b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dc71851284e2d20ab6760b82defa6b8">&#9670;&nbsp;</a></span>Latency_range</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a9dc71851284e2d20ab6760b82defa6b8">flow::net_flow::Net_env_simulator::Latency_range</a> =  std::pair&lt;<a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a>, <a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for latency range [low, high]. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00090">90</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

</div>
</div>
<a id="a1db158ebdacaeea526a9d50c5beddc0d" name="a1db158ebdacaeea526a9d50c5beddc0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1db158ebdacaeea526a9d50c5beddc0d">&#9670;&nbsp;</a></span>Latency_seq</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">flow::net_flow::Net_env_simulator::Latency_seq</a> =  std::queue&lt;<a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for list of packet latencies. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00087">87</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

</div>
</div>
<a id="a3ed1661440b977426b6d5be959ecc85a" name="a3ed1661440b977426b6d5be959ecc85a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ed1661440b977426b6d5be959ecc85a">&#9670;&nbsp;</a></span>Packet_dup_seq</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">flow::net_flow::Net_env_simulator::Packet_dup_seq</a> =  std::queue&lt;<a class="el" href="classbool.html">bool</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for list of packet duplication outcomes. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00084">84</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

</div>
</div>
<a id="af810d3db1d281e1a29e9b0ebf578a2ca" name="af810d3db1d281e1a29e9b0ebf578a2ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af810d3db1d281e1a29e9b0ebf578a2ca">&#9670;&nbsp;</a></span>Packet_loss_seq</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">flow::net_flow::Net_env_simulator::Packet_loss_seq</a> =  std::queue&lt;<a class="el" href="classbool.html">bool</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for list of packet loss outcomes. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00081">81</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

</div>
</div>
<a id="a6b0ed8c75b296b26b63eacb73e4b3d5d" name="a6b0ed8c75b296b26b63eacb73e4b3d5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b0ed8c75b296b26b63eacb73e4b3d5d">&#9670;&nbsp;</a></span>prob_type_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">flow::net_flow::Net_env_simulator::prob_type_t</a> =  double</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for floating point between 0 and 1 used to express probability. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00078">78</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

</div>
</div>
<a id="aae1f08e4dec6c3e4855a3548b1e88ffb" name="aae1f08e4dec6c3e4855a3548b1e88ffb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae1f08e4dec6c3e4855a3548b1e88ffb">&#9670;&nbsp;</a></span>Random_generator</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#aae1f08e4dec6c3e4855a3548b1e88ffb">flow::net_flow::Net_env_simulator::Random_generator</a> =  <a class="el" href="classflow_1_1util_1_1Rnd__gen__uniform__range__base.html#a519fc83fd1c52a82618cd85f3a089668">util::Rnd_gen_uniform_range_base::Random_generator</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Random number generator. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00172">172</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

</div>
</div>
<a id="abfee43798dfbb7edb5428d1b939e5d53" name="abfee43798dfbb7edb5428d1b939e5d53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfee43798dfbb7edb5428d1b939e5d53">&#9670;&nbsp;</a></span>seed_type_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#abfee43798dfbb7edb5428d1b939e5d53">flow::net_flow::Net_env_simulator::seed_type_t</a> =  uint32_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for the random seed integer type. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00075">75</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a29cbd6ad9be0d9bf7ac72a4e0675d4b8" name="a29cbd6ad9be0d9bf7ac72a4e0675d4b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29cbd6ad9be0d9bf7ac72a4e0675d4b8">&#9670;&nbsp;</a></span>Net_env_simulator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">flow::net_flow::Net_env_simulator::Net_env_simulator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *&#160;</td>
          <td class="paramname"><em>logger_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#abfee43798dfbb7edb5428d1b939e5d53">seed_type_t</a>&#160;</td>
          <td class="paramname"><em>random_seed</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a>&#160;</td>
          <td class="paramname"><em>recv_packet_loss_prob</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">Packet_loss_seq</a> &amp;&#160;</td>
          <td class="paramname"><em>recv_packet_loss_seq</em> = <code><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">Packet_loss_seq</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a9dc71851284e2d20ab6760b82defa6b8">Latency_range</a> &amp;&#160;</td>
          <td class="paramname"><em>recv_latency_range</em> = <code><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a9dc71851284e2d20ab6760b82defa6b8">Latency_range</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">Latency_seq</a> &amp;&#160;</td>
          <td class="paramname"><em>recv_latency_seq</em> = <code><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">Latency_seq</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a>&#160;</td>
          <td class="paramname"><em>recv_packet_dup_prob</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">Packet_dup_seq</a> &amp;&#160;</td>
          <td class="paramname"><em>recv_packet_dup_seq</em> = <code><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">Packet_dup_seq</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs simulator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">logger_ptr</td><td>Logger to use for subsequently logging. </td></tr>
    <tr><td class="paramname">random_seed</td><td>Random seed to use for the internal random number generator. Assuming all else is equal (which can often be the case if all tested components are kept on the same machine/loopback), using the same seed twice to run the same operations should result in the same results. If 0 is provided, seed is chosen based on the current time. </td></tr>
    <tr><td class="paramname">recv_packet_loss_prob</td><td>Probability that the given received packet will get dropped instead of actually being received (0 is never; 1 is always; and anywhere in between). This probability is applied only once elements of recv_packet_loss_seq run out. </td></tr>
    <tr><td class="paramname">recv_packet_loss_seq</td><td>List of packet loss outcomes for received packets. When packet <code>i</code> (in chronological order) is received, it is dropped instead of actually being received if the <code>i</code>-th element in <code>recv_packet_loss_seq</code> is true; otherwise it is not so dropped. Once <code>i &gt;= recv_packet_loss_seq.size()</code>, <code>recv_packet_loss_prob</code> is used instead. </td></tr>
    <tr><td class="paramname">recv_latency_range</td><td>The range to use for the randomly generated latencies for received packets. The pair specifies the [min, max] (inclusive) latency range in its first and second elements respectively. The latency is chosen uniformly along that range. This range is applied only once elements of <code>recv_latency_seq</code> run out. </td></tr>
    <tr><td class="paramname">recv_latency_seq</td><td>List of latency outcomes for received packets. When packet <code>i</code> (in chronological order) is received, it is lagged by N, where N is the <code>i</code>-th element in <code>recv_latency_seq</code>. Once <code>i &gt;= recv_latency_seq.size()</code>, `recv_latency_range is used instead. </td></tr>
    <tr><td class="paramname">recv_packet_dup_prob</td><td>Probability that the given received packet will get duplicated in addition to actually being received (0 is never; 1 is always; and anywhere in between). This probability is applied only once elements of <code>recv_packet_dup_seq</code> run out. </td></tr>
    <tr><td class="paramname">recv_packet_dup_seq</td><td>List of packet loss outcomes for received packets. When packet <code>i</code> (in chronological order) is received, it is duplicated in addition to actually being received if the <code>i</code>-th element in <code>recv_packet_dup_seq</code> is true; otherwise it is not so duplicated. Once <code>i &gt;= recv_packet_dup_seq.size()</code>, <code>recv_packet_dup_prob</code> is used instead. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8cpp_source.html#l00025">25</a> of file <a class="el" href="net__env__simulator_8cpp_source.html">net_env_simulator.cpp</a>.</p>

<p class="reference">References <a class="el" href="log_8hpp_source.html#l00197">FLOW_LOG_INFO</a>, and <a class="el" href="net__env__simulator_8hpp_source.html#l00177">m_seed</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aadc0bd07b7d8f589ec6f361ed4ed8c6c" name="aadc0bd07b7d8f589ec6f361ed4ed8c6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadc0bd07b7d8f589ec6f361ed4ed8c6c">&#9670;&nbsp;</a></span>received_packet_latency()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a> flow::net_flow::Net_env_simulator::received_packet_latency </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Low-level packet was received and not dropped, but should we simulate that it was lagged by an additional amount of time, before actually getting received, and if so how much? Latency range and/or prescribed latencies are set at construction. </p>
<dl class="section return"><dt>Returns</dt><dd>How long the next packet should be lagged. May be zero. </dd></dl>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8cpp_source.html#l00083">83</a> of file <a class="el" href="net__env__simulator_8cpp_source.html">net_env_simulator.cpp</a>.</p>

<p class="reference">References <a class="el" href="net__env__simulator_8hpp_source.html#l00203">m_recv_latency_distribution_msec</a>, <a class="el" href="net__env__simulator_8hpp_source.html#l00197">m_recv_latency_seq</a>, and <a class="el" href="net__env__simulator_8hpp_source.html#l00180">m_rnd_generator</a>.</p>

</div>
</div>
<a id="ad4f21b9f4db47570989e87af50b560ae" name="ad4f21b9f4db47570989e87af50b560ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4f21b9f4db47570989e87af50b560ae">&#9670;&nbsp;</a></span>should_drop_received_packet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbool.html">bool</a> flow::net_flow::Net_env_simulator::should_drop_received_packet </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Low-level packet was received, but should we simulate that it was dropped before receipt? Probability and/or prescribed packet loss are set at construction. </p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if dropped; <code>false</code> otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8cpp_source.html#l00057">57</a> of file <a class="el" href="net__env__simulator_8cpp_source.html">net_env_simulator.cpp</a>.</p>

<p class="reference">References <a class="el" href="net__env__simulator_8hpp_source.html#l00190">m_recv_packet_loss_distribution</a>, <a class="el" href="net__env__simulator_8hpp_source.html#l00187">m_recv_packet_loss_seq</a>, and <a class="el" href="net__env__simulator_8hpp_source.html#l00180">m_rnd_generator</a>.</p>

</div>
</div>
<a id="ad3507a56fd416c215423d4519e4ac176" name="ad3507a56fd416c215423d4519e4ac176"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3507a56fd416c215423d4519e4ac176">&#9670;&nbsp;</a></span>should_duplicate_received_packet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbool.html">bool</a> flow::net_flow::Net_env_simulator::should_duplicate_received_packet </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Low-level packet was received, but should we simulate that it was duplicated? Probability and/or prescribed packet duplication decisions are set at construction. </p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if duplicated; <code>false</code> otherwise. </dd></dl>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8cpp_source.html#l00070">70</a> of file <a class="el" href="net__env__simulator_8cpp_source.html">net_env_simulator.cpp</a>.</p>

<p class="reference">References <a class="el" href="net__env__simulator_8hpp_source.html#l00213">m_recv_packet_dup_distribution</a>, <a class="el" href="net__env__simulator_8hpp_source.html#l00210">m_recv_packet_dup_seq</a>, and <a class="el" href="net__env__simulator_8hpp_source.html#l00180">m_rnd_generator</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa077d5b9bc824da5fa7f3b504c83d33c" name="aa077d5b9bc824da5fa7f3b504c83d33c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa077d5b9bc824da5fa7f3b504c83d33c">&#9670;&nbsp;</a></span>m_recv_latency_distribution_msec</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boost::random::uniform_int_distribution&lt;Fine_duration::rep&gt; flow::net_flow::Net_env_simulator::m_recv_latency_distribution_msec</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns random latencies (in units of <code>Fine_duration</code>) within the improper [low, high] range given at construction; used for received packet latency. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00203">203</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="net__env__simulator_8cpp_source.html#l00083">received_packet_latency()</a>.</p>

</div>
</div>
<a id="ac14a4e2f96cde90306384313730ee914" name="ac14a4e2f96cde90306384313730ee914"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac14a4e2f96cde90306384313730ee914">&#9670;&nbsp;</a></span>m_recv_latency_seq</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a1db158ebdacaeea526a9d50c5beddc0d">Latency_seq</a> flow::net_flow::Net_env_simulator::m_recv_latency_seq</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>At a given point in time, the <code>i</code>-th from now (in chronological order) received packet will be lagged by value in <code>i</code>-th element of <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#ac14a4e2f96cde90306384313730ee914" title="At a given point in time, the i-th from now (in chronological order) received packet will be lagged b...">m_recv_latency_seq</a>. </p>
<p >For example, the next packet will lagged by <code>m_recv_latency_seq.front()</code>. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00197">197</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="net__env__simulator_8cpp_source.html#l00083">received_packet_latency()</a>.</p>

</div>
</div>
<a id="ab01aa06b2136ab24ef7d411698096fc4" name="ab01aa06b2136ab24ef7d411698096fc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab01aa06b2136ab24ef7d411698096fc4">&#9670;&nbsp;</a></span>m_recv_packet_dup_distribution</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boost::random::bernoulli_distribution&lt;<a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a>&gt; flow::net_flow::Net_env_simulator::m_recv_packet_dup_distribution</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns <code>true</code> or <code>false</code> according to some probability set at construction; used for received packet duplication. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00213">213</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="net__env__simulator_8cpp_source.html#l00070">should_duplicate_received_packet()</a>.</p>

</div>
</div>
<a id="a2b05bfbdaee55c7ece72344e4a0f3b04" name="a2b05bfbdaee55c7ece72344e4a0f3b04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b05bfbdaee55c7ece72344e4a0f3b04">&#9670;&nbsp;</a></span>m_recv_packet_dup_seq</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a3ed1661440b977426b6d5be959ecc85a">Packet_dup_seq</a> flow::net_flow::Net_env_simulator::m_recv_packet_dup_seq</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>At a given point in time, the <code>i</code>-th from now (in chronological order) received packet will be duplicated if and only if the <code>i</code>-th element of <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a2b05bfbdaee55c7ece72344e4a0f3b04" title="At a given point in time, the i-th from now (in chronological order) received packet will be duplicat...">m_recv_packet_dup_seq</a> is <code>true</code>. </p>
<p >For example, the next packet will be duplicated if and only if <code>m_recv_packet_dup_seq.front()</code> is <code>true</code>. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00210">210</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="net__env__simulator_8cpp_source.html#l00070">should_duplicate_received_packet()</a>.</p>

</div>
</div>
<a id="a599755f43627661e5ab721f57708ecac" name="a599755f43627661e5ab721f57708ecac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a599755f43627661e5ab721f57708ecac">&#9670;&nbsp;</a></span>m_recv_packet_loss_distribution</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boost::random::bernoulli_distribution&lt;<a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a6b0ed8c75b296b26b63eacb73e4b3d5d">prob_type_t</a>&gt; flow::net_flow::Net_env_simulator::m_recv_packet_loss_distribution</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns <code>true</code> or <code>false</code> according to some probability set at construction; used for received packet loss. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00190">190</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="net__env__simulator_8cpp_source.html#l00057">should_drop_received_packet()</a>.</p>

</div>
</div>
<a id="a861af16185e100777bff382b278ac138" name="a861af16185e100777bff382b278ac138"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a861af16185e100777bff382b278ac138">&#9670;&nbsp;</a></span>m_recv_packet_loss_seq</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#af810d3db1d281e1a29e9b0ebf578a2ca">Packet_loss_seq</a> flow::net_flow::Net_env_simulator::m_recv_packet_loss_seq</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>At a given point in time, the <code>i</code>-th from now (in chronological order) received packet will be dropped if and only if the <code>i</code>-th element of <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a861af16185e100777bff382b278ac138" title="At a given point in time, the i-th from now (in chronological order) received packet will be dropped ...">m_recv_packet_loss_seq</a> is true. </p>
<p >For example, the next packet will be dropped if and only if <code>m_recv_packet_loss_seq.front()</code> is <code>true</code>. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00187">187</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="net__env__simulator_8cpp_source.html#l00057">should_drop_received_packet()</a>.</p>

</div>
</div>
<a id="a564e92e0cb49425be5962db80ef75a43" name="a564e92e0cb49425be5962db80ef75a43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a564e92e0cb49425be5962db80ef75a43">&#9670;&nbsp;</a></span>m_rnd_generator</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#aae1f08e4dec6c3e4855a3548b1e88ffb">Random_generator</a> flow::net_flow::Net_env_simulator::m_rnd_generator</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Random number generator for various random events like packet loss. </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00180">180</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="net__env__simulator_8cpp_source.html#l00083">received_packet_latency()</a>, <a class="el" href="net__env__simulator_8cpp_source.html#l00057">should_drop_received_packet()</a>, and <a class="el" href="net__env__simulator_8cpp_source.html#l00070">should_duplicate_received_packet()</a>.</p>

</div>
</div>
<a id="ac532250636f3ae5b045310e9d791c7d2" name="ac532250636f3ae5b045310e9d791c7d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac532250636f3ae5b045310e9d791c7d2">&#9670;&nbsp;</a></span>m_seed</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#abfee43798dfbb7edb5428d1b939e5d53">seed_type_t</a> flow::net_flow::Net_env_simulator::m_seed</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Random seed for <a class="el" href="classflow_1_1net__flow_1_1Net__env__simulator.html#a564e92e0cb49425be5962db80ef75a43" title="Random number generator for various random events like packet loss.">m_rnd_generator</a> (saved for reproducibility of "random" events). </p>

<p class="definition">Definition at line <a class="el" href="net__env__simulator_8hpp_source.html#l00177">177</a> of file <a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="net__env__simulator_8cpp_source.html#l00025">Net_env_simulator()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>net_flow/<a class="el" href="net__env__simulator_8hpp_source.html">net_env_simulator.hpp</a></li>
<li>net_flow/<a class="el" href="net__env__simulator_8cpp_source.html">net_env_simulator.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
